#ifndef DATE_H
#define DATE_H


class Date
{
    public:
        Date();

        Date(char strDate[]);
        Date(int Y,int M,int D);
        void setDate(int Y,int M,int D);
        void show ()const;
        int getYear;
        void setYear(int Y);
        int getMOnth();
        void setMonth(int M);
        int getDay();
        void setDay(int D);
        char* toString();
        int daysPerMonth(int m =-1)const;
        int dayaPerYear(int y =-1)const;
        int compare (const Date &date)const;
        bool isLeapYear(int y=-1)const;
        int subDate(const Date &date)const;
        Date subDays(int days) const;
        Date addDays (int days) const ;

        virtual ~Date();

    protected:

    private:
        int year,month,day;
        void addOneDay();
        void subOneDay ();
        int subSmallDate(const Date &dat) const;
};

#endif // DATE_H
